package com.ruoyi.emergency.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import com.ruoyi.emergency.service.IEmergencyGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.emergency.mapper.EmergencyGoodsMapper;
import com.ruoyi.emergency.domain.EmergencyGoods;

/**
 * 应急救援物资Service业务层处理
 * 
 * @author hcc
 * @date 2024-11-17
 */
@Service
public class EmergencyGoodsServiceImpl extends ServiceImpl<EmergencyGoodsMapper, EmergencyGoods> implements IEmergencyGoodsService //修改
{
    @Autowired
    private EmergencyGoodsMapper emergencyGoodsMapper;

    /**
     * 查询应急救援物资
     * 
     * @param id 应急救援物资主键
     * @return 应急救援物资
     */
    @Override
    public EmergencyGoods selectEmergencyGoodsById(Long id)
    {
        return emergencyGoodsMapper.selectEmergencyGoodsById(id);
    }

    /**
     * 查询应急救援物资列表
     * 
     * @param emergencyGoods 应急救援物资
     * @return 应急救援物资
     */
    @Override
    public List<EmergencyGoods> selectEmergencyGoodsList(EmergencyGoods emergencyGoods)
    {
        return emergencyGoodsMapper.selectEmergencyGoodsList(emergencyGoods);
    }

    /**
     * 新增应急救援物资
     * 
     * @param emergencyGoods 应急救援物资
     * @return 结果
     */
    @Override
    public int insertEmergencyGoods(EmergencyGoods emergencyGoods)
    {
        return emergencyGoodsMapper.insertEmergencyGoods(emergencyGoods);
    }

    /**
     * 修改应急救援物资
     * 
     * @param emergencyGoods 应急救援物资
     * @return 结果
     */
    @Override
    public int updateEmergencyGoods(EmergencyGoods emergencyGoods)
    {
        return emergencyGoodsMapper.updateEmergencyGoods(emergencyGoods);
    }

    /**
     * 批量删除应急救援物资
     * 
     * @param ids 需要删除的应急救援物资主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyGoodsByIds(Long[] ids)
    {
        return emergencyGoodsMapper.deleteEmergencyGoodsByIds(ids);
    }

    /**
     * 删除应急救援物资信息
     * 
     * @param id 应急救援物资主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyGoodsById(Long id)
    {
        return emergencyGoodsMapper.deleteEmergencyGoodsById(id);
    }
}
